package com.kehongborui.net;

import java.net.URLDecoder;
import java.net.URLEncoder;

/**
 * url 编码解码
 */
public class URLEncoderAndDecoderDemo {
    public static void main(String[] args) {
        String encoderStr = URLEncoder.encode("中");  // 编码
        System.out.println(encoderStr);
        System.out.println(URLDecoder.decode("%E4%B8%AD")); // 解码
    }
}
